import 'package:flutter/cupertino.dart';
import 'package:demo/pages/models/card.dart' as MyCard;
import 'package:flutter/material.dart';

class MyWallet extends ChangeNotifier{
  final List<MyCard.Card> myWallet=[
    MyCard.Card(id: '4564165163',cardNo: '0000000000001380', value: 5421.80,cardColor: "white70"),
    MyCard.Card(id: '4165',cardNo: '000000000078916', value: 90.986,cardColor: "white70"),
  ];
  final List<MyCard.Card> _userCart = [];

  List<MyCard.Card> get shop => myWallet;

  List<MyCard.Card> get cart => _userCart;

  void addToCart(MyCard.Card card) {
    _userCart.add(card);
    notifyListeners();
  }

  void removeFromCart(MyCard.Card card) {
    _userCart.remove(card);
    notifyListeners();
  }
}